package com.jiefeng.manager.service.impl;

import com.jiefeng.dao.RefundOrderMapper;
import com.jiefeng.manager.service.RefundService;
import com.jiefeng.manager.table.RefundOrderInfo;
import com.jiefeng.manager.queryRequest.RefundOrderRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by huangtongshuan on 2016/5/15 14:44.
 */
@Service
public class RefundServiceImpl implements RefundService {
    private final Logger logger = LoggerFactory.getLogger(RefundServiceImpl.class);

    @Autowired
    private RefundOrderMapper refundOrderMapper;

    public List<RefundOrderInfo> getOrderListById(String id) {
        RefundOrderRequest request = new RefundOrderRequest();
        request.setId(id);
        return refundOrderMapper.get(request);
    }

    @Override
    public List<RefundOrderInfo> getListBypage(RefundOrderRequest refundOrderRequest) {
        return refundOrderMapper.getListBypage(refundOrderRequest);
    }

    public List<RefundOrderInfo> getOrderListByRequest(RefundOrderRequest request) {
        return refundOrderMapper.get(request);
    }

    @Override
    public long countbyParam(Map<String, String> param) {
        return refundOrderMapper.countByparam(param);
    }

    @Override
    public int getCount(RefundOrderRequest refundOrderRequest) {
        return refundOrderMapper.getCount(refundOrderRequest);
    }
}
